package zad1;
import java.util.ArrayList;

public class Zad1Test {

	public static void main(String[] args) {
		
		int liczbaProducentow = 1, liczbaKonsumentow = 10, rozmiarBuffora = 5;
		
		ArrayList<Thread> threads = new ArrayList<Thread>();
		
		Buffer b = new Buffer(rozmiarBuffora);
		
		System.out.println( b.deque);
		
		for (int i = 0; i < liczbaProducentow; i++) {
			threads.add(new Producer(b));
		}
		for (int i = 0; i < liczbaKonsumentow; i++) {
			threads.add(new Consumer(b));
		}
		
		for (Thread thread : threads) {
			thread.start();
		}

	}
}
